/**
 * 用于生成表单校验，指定正则规则的触发方式。
 * 未在此处声明无触发方式的组件将不生成rule！！
 */
export const ruleTrigger = {
  "el-input": "blur",
  "el-input-number": "blur",
  "el-select": "change",
  "el-radio-group": "change",
  "el-checkbox-group": "change",
  "el-cascader": "change",
  "el-time-picker": "change",
  "el-date-picker": "change",
  "el-rate": "change",
  "el-color-picker": "change",
  "Good-UploadImg": "change",
  "com-select": "change",
  "org-select": "change",
  "pos-select": "change",
  "user-select": "change",
  "dic-select": "change"
};
// 基础控件 【左面板】
export const inputComponents = [
  {
    _config_: {
      goodKey: "comInput",
      label: "单行输入",
      labelWidth: undefined,
      showLabel: true,
      tag: "GoodInput",
      tagIcon: " input",
      defaultValue: undefined,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      noShow: false,
      regList: [],
      trigger: "blur"
    },
    slot: {
      prepend: "",
      append: ""
    },
    placeholder: "请输入",
    style: { width: "100%" },
    clearable: true,
    "prefix-icon": "",
    "suffix-icon": "",
    maxlength: null,
    minlength: null,
    "show-word-limit": false,
    "show-password": false,
    readonly: false,
    disabled: false
  },
  {
    _config_: {
      goodKey: "textarea",
      label: "多行输入",
      labelWidth: undefined,
      showLabel: true,
      tag: "GoodTextArea",
      tagIcon: "textarea",
      defaultValue: undefined,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "blur"
    },
    type: "textarea",
    placeholder: "请输入",
    // autosize: {
    //   minRows: 4,
    //   maxRows: 4
    // },
    style: { width: "100%" },
    maxlength: null,
    "show-word-limit": true,
    readonly: false,
    disabled: false,
    clearable: false,
    rows: 4
  },
  {
    _config_: {
      goodKey: "inputNumber",
      label: "数字输入",
      showLabel: true,
      labelWidth: undefined,
      tag: "el-input-number",
      tagIcon: "number",
      defaultValue: undefined,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: ["blur", "change"]
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}",
      blur: "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    placeholder: "数字文本",
    min: undefined,
    max: undefined,
    step: 1,
    "step-strictly": false,
    precision: undefined,
    "controls-position": "",
    disabled: false,
    controls: true
  },
  {
    _config_: {
      goodKey: "switch",
      label: "开关",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-switch",
      tagIcon: "switch",
      defaultValue: false,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    disabled: false,
    activeTxt: "开",
    inactiveTxt: "关",
    "active-color": null,
    "inactive-color": null,
    "active-value": 1,
    "inactive-value": 0
  },
  {
    _config_: {
      goodKey: "radio",
      label: "单选框组",
      labelWidth: undefined,
      showLabel: true,
      tag: "GoodRadioGroup",
      tagIcon: "radio",
      defaultValue: undefined,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change",
      optionType: "default",
      border: false,
      dataType: "static",
      dictionaryType: "",
      propsUrl: "",
      props: {
        label: "label",
        value: "value"
      }
    },
    options: [
      {
        label: "选项一",
        value: "1"
      },
      {
        label: "选项二",
        value: "2"
      }
    ],
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    style: {},
    size: "small",
    disabled: false
  },
  {
    _config_: {
      goodKey: "checkbox",
      label: "多选框组",
      labelWidth: undefined,
      showLabel: true,
      tag: "GoodCheckGroup",
      tagIcon: "checkbox",
      defaultValue: [],
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change",
      optionType: "default",
      border: false,
      dataType: "static",
      dictionaryType: "",
      propsUrl: "",
      props: {
        props: {
          label: "label",
          value: "value"
        }
      }
    },
    options: [
      {
        label: "选项一",
        value: "1"
      },
      {
        label: "选项二",
        value: "2"
      }
    ],
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    style: {},
    size: "small",
    disabled: false
  },
  {
    _config_: {
      goodKey: "select",
      label: "下拉选择",
      labelWidth: undefined,
      showLabel: true,
      tag: "GoodSelect",
      tagIcon: "select",
      defaultValue: "",
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change",
      dataType: "static",
      dictionaryType: "",
      propsUrl: "",
      props: {
        label: "label",
        value: "value"
      }
    },
    options: [
      {
        label: "选项一",
        value: "1"
      },
      {
        label: "选项二",
        value: "2"
      }
    ],
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}",
      blur: "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    placeholder: "请选择",
    style: { width: "100%" },
    clearable: true,
    disabled: false,
    filterable: false,
    multiple: false
  },
  {
    _config_: {
      goodKey: "cascader",
      label: "级联选择",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-cascader",
      tagIcon: "cascader",
      defaultValue: [],
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change",
      dataType: "static",
      propsUrl: "",
      dictionaryType: ""
    },
    options: [
      {
        value: "1",
        label: "选项1",
        children: [
          {
            value: "2",
            label: "选项1-1"
          }
        ]
      }
    ],
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}",
      blur: "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    placeholder: "请选择",
    style: { width: "100%" },
    props: {
      multiple: false,
      value: "value",
      label: "label",
      children: "children"
    },
    "show-all-levels": true,
    disabled: false,
    clearable: true,
    filterable: false,
    separator: "/"
  },
  {
    _config_: {
      goodKey: "date",
      label: "日期选择",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-date-picker",
      tagIcon: "date",
      defaultValue: null,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}",
      blur: "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    placeholder: "请选择",
    type: "date",
    style: { width: "100%" },
    disabled: false,
    clearable: true,
    format: "yyyy-MM-dd",
    "value-format": "timestamp",
    readonly: false
  },
  {
    _config_: {
      goodKey: "time",
      label: "时间选择",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-time-picker",
      tagIcon: "time",
      defaultValue: null,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}",
      blur: "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    placeholder: "请选择",
    style: { width: "100%" },
    disabled: false,
    clearable: true,
    readonly: false,
    "picker-options": {
      selectableRange: "00:00:00-23:59:59"
    },
    format: "HH:mm:ss",
    "value-format": "HH:mm:ss"
  },
  {
    _config_: {
      goodKey: "uploadFz",
      label: "文件上传",
      labelWidth: undefined,
      showLabel: true,
      tag: "Good-UploadFz",
      tagIcon: "upload",
      defaultValue: [],
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "click"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    disabled: false,
    accept: "",
    fileSize: 5,
    sizeUnit: "MB",
    buttonText: "点击上传",
    showTip: false,
    limit: 9
  },
  {
    _config_: {
      goodKey: "uploadImg",
      label: "图片上传",
      labelWidth: undefined,
      showLabel: true,
      tag: "Good-UploadImg",
      tagIcon: "upload",
      defaultValue: [],
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "click"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    disabled: false,
    accept: "",
    showTip: false,
    fileSize: 5,
    sizeUnit: "MB",
    limit: 9
  },
  {
    _config_: {
      goodKey: "colorPicker",
      label: "颜色选择",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-color-picker",
      tagIcon: "color",
      defaultValue: null,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    "show-alpha": false,
    "color-format": "",
    disabled: false,
    size: "small"
  },
  {
    _config_: {
      goodKey: "rate",
      label: "评分",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-rate",
      tagIcon: "rate",
      defaultValue: 0,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    style: {},
    max: 5,
    "allow-half": false,
    "show-text": false,
    "show-score": false,
    disabled: false
  },
  {
    _config_: {
      goodKey: "slider",
      label: "滑块",
      labelWidth: undefined,
      showLabel: true,
      tag: "el-slider",
      tagIcon: "slider",
      defaultValue: undefined,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      tableName: "",
      regList: [],
      trigger: "change"
    },
    on: {
      change:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    disabled: false,
    min: 0,
    max: 100,
    step: 1,
    "show-stops": false,
    range: false
  },
  {
    _config_: {
      goodKey: "divider",
      label: "分割线",
      labelWidth: undefined,
      showLabel: false,
      tag: "el-divider",
      tagIcon: "divider",
      defaultValue: null,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"]
    },
    slot: {
      default: "我是分割线"
    },
    "content-position": "center"
  },
  {
    _config_: {
      goodKey: "text",
      label: "文本",
      labelWidth: undefined,
      showLabel: false,
      tag: "el-text",
      tagIcon: "textarea",
      defaultValue: "这是一段文字",
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"]
    },
    bold: false,
    style: { width: "100%" },
    color: "#000000",
    "text-align": "left",
    "font-weight": "normal",
    "font-style": "normal",
    "text-decoration": "none",
    "line-height": 32,
    "font-size": 12,
    type: ""
  },

  {
    _config_: {
      goodKey: "button",
      label: "按钮",
      labelWidth: undefined,
      showLabel: false,
      tag: "button",
      tagIcon: "button",
      defaultValue: null,
      required: false,
      layout: "StandaloneItem",
      span: 24,
      dragDisabled: false,
      visibility: ["pc", "app"],
      regList: [],
      trigger: "click"
    },
    on: {
      click:
        "({ data, formData, setFormData, setShowOrHide, setRequired, setDisabled, request, getFieldOptions, setFieldOptions }) => {\n    // 在此编写代码\n    \n}"
    },
    buttonText: "按钮",
    type: "primary", //'primary'| 'success'| 'warning'| 'danger'| 'info' | ''
    disabled: false,
    size: "small",
    round: false, //圆角按钮
    plain: false, //朴素按钮
    circle: false, //圆形按钮
    text: false
  }
];

export default {
  inputComponents
};
